package com.cryptape.cita_wallet.constant.url;

/**
 * Created by duanyytop on 2018/11/18
 */
public class HttpEtherUrls {

    // Ether node host
//    https://mainnet.infura.io/v3/3ffb5509990b4964acd6de7991d5750d
    public static final String ETH_NODE_MAIN_URL = "https://mainnet.infura.io/v3/dc6e037d7e2141e38e2b8042d29438aa";

//    public static final String ETH_NODE_MAIN_URL = "https://mainnet.infura.io/h3iIzGIN6msu3KeUrdlt";
    public static final String ETH_NODE_URL_RINKEBY = "https://rinkeby.infura.io/v3/dc6e037d7e2141e38e2b8042d29438aa";
//    public static final String ETH_NODE_URL_RINKEBY = "https://rinkeby.infura.io/llyrtzQ3YhkdESt2Fzrk";
//    public static final String ETH_NODE_URL_RINKEBY = "https://rinkeby.infura.io/v3/llyrtzQ3YhkdESt2Fzrk";
//    public static final String ETH_NODE_URL_KOVAN = "https://kovan.infura.io/llyrtzQ3YhkdESt2Fzrk";
    public static final String ETH_NODE_URL_KOVAN = "https://kovan.infura.io/v3/dc6e037d7e2141e38e2b8042d29438aa";
//    public static final String ETH_NODE_URL_ROPSTEN = "https://ropsten.infura.io/llyrtzQ3YhkdESt2Fzrk";
//    public static final String ETH_NODE_URL_ROPSTEN = "https://ropsten.infura.io/v3/dc30ca8fb7824f42976ece0e74884807";
    public static final String ETH_NODE_URL_ROPSTEN = "https://ropsten.infura.io/v3/dc6e037d7e2141e38e2b8042d29438aa";
    // Ether transaction list url
    public static final String ETHER_SCAN_API_KEY ="T9GV1IF4V7YDXQ8F53U1FK2KHCE2KUUD8Z";//"T9GV1IF4V7YDXQ8F53U1FK2KHCE2KUUD8Z";// "Y5BJ5VA3XZ59F63XQCQDDUWU2C29144MMM";//"T9GV1IF4V7YDXQ8F53U1FK2KHCE2KUUD8Z";
//    public static final String ETH_MAIN_BASE_URL = "http://api.etherscan.io/api";
    public static final String ETH_MAIN_BASE_URL = "https://api-cn.etherscan.com/api";
//    public static final String ETH_MAIN_BASE_URL = "https://api.etherscan.io/api";
    public static final String ETH_RINKEBY_BASE_URL = "https://api-rinkeby.etherscan.io/api";
    public static final String ETH_KOVAN_BASE_URL = "https://api-kovan.etherscan.io/api";
    public static final String ETH_ROPSTEN_BASE_URL = "https://api-ropsten.etherscan.io/api";

    public static final String END_URL = "?apikey=" + ETHER_SCAN_API_KEY
            + "&module=account&action=txlist&sort=desc&address=%s&page=%s&offset=%s";
    public static final String ERC20_END_URL = "?apikey=" + ETHER_SCAN_API_KEY
            + "&module=account&action=tokentx&sort=desc&contractaddress=%s&address=%s&page=%s&offset=%s";
    public static final String ETH_TRANSACTION_STATUS_URL = "?apikey=" + ETHER_SCAN_API_KEY
            + "&module=transaction&action=gettxreceiptstatus&txhash=%s";

}

//java.net.SocketTimeoutException: failed to connect to api.etherscan.io/2001::1f0d:5401 (port 443) from /2409:8954:3254:1aa2:1dc1:fb0b:e65e:bc6b (port 42868) after 10000ms


//https://api-ropsten.etherscan.io/api?
// apikey=T9GV1IF4V7YDXQ8F53U1FK2KHCE2KUUD8Z
// &module=account
// &action=tokentx
// &sort=desc
// &contractaddress=0xb2054aDd212F19581aEB195FDa7644471a996134
// &address=0xcEE5700b976ac40c536B43c2F4Fd39d9BaFADFC7
// &page=0
// &offset=200